//@Description:将员工管理页面的1千200多行js拆出来，
//@Date 2017年7月3日16:37:55
//@Author:shuyangyang

/**
 * 跳转到工作日志
 */
function enterLog() {
	var url = '/IMS/queryWorkRecord/queryWorkRecordList.ht';
	url = url + "?eid=" + eid + "&pcid=" + pcid;
	$.go(url, {
		dataType : 'html',
		beforeSend : function() {
			showProccessBar();
		},
		error : function() {
			hideProccessBar();
		},
		success : function(data, textStatus) {
			replaceDocument(url, data);
		}
	});
}

/**
 * 跳转到任职记录
 */
function enterRecord() {
	var url = '/IMS/jobservice/list.ht';
	url = url + "?eid=" + eid + "&companyId=" + pcid;
	$.go(url, {
		dataType : 'html',
		beforeSend : function() {
			showProccessBar();
		},
		error : function() {
			hideProccessBar();
		},
		success : function(data, textStatus) {
			replaceDocument(url, data);
		}
	});
}

/**
 * 返回上级
 */
function returnEmp() {
	var url = "/IMS/employee/showList.ht?pcid=" + pcid;
	$.go(url, {
		dataType : 'html',
		beforeSend : function() {
			showProccessBar();
		},
		error : function() {
			hideProccessBar();
		},
		success : function(data, textStatus) {
			replaceDocument(url, data);
		}
	});
}

/**
 * 跳转部门机构页面
 */
function enterDep() {
	var s_cid = $("#cSelect2").val();
	var s_pcid = $("#cpSelect2").val();
	if (isOnlyOne) {
		s_pcid = pcid;
	}
	var url = '/IMS/depart/showList.ht';
	url = url + "?cid=" + s_cid + "&companyId=" + s_pcid;

	var title = "添加部门职位";

	var jq = top.jQuery;
	showProccessBar();
	if (jq("#tab-menus").tabs("exists", title)) {
		jq("#tab-menus").tabs("close", title)
	}
	if (!url) {
		hideProccessBar();
		return;
	}
	tab_is_new = true;
	
	jq("#tab-menus").tabs("add", {
		title : '部门信息管理',
		selected : true,
		closable : true,
		cache : false,
		content : function() {
			var height = document.documentElement.scrollHeight + 'px';
			var dom = "<iframe height=\"" + height + "\" width=\"100%\" src=\"" + url + "\" name=\"iframe_text\" scrolling=\"auto\" frameborder=\"no\" ></iframe>";
			return dom;
		}
	});
}